﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>学生信息管理系统</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <div class="waper">
  <div class="main1">
 



<?php
include 'connect.php';
 if ($_GET['action']=='add'){
	
	$query = mysql_query("insert into room (rid,rname) values 
	
	('{$_POST['number']}','{$_POST['name']}')") or die(mysql_error());
		echo "<script type='text/javascript'>alert('注册成功');window.location.href='index.php';</script>";
}
 


?>



 
 



 


<form id="form1" name="form1" method="post" action="?action=add" style="padding:250px 0 0 200px;">

          <table id="biao"  style=" padding:30px;"  align="center">
              <tr><td></td><td style=" font-size:16px; font-weight:bold;">&nbsp;&nbsp;学生注册</td></tr>
             <tr>
              <td align="right">姓名:</td>
              <td><input name="name" type="text" /></td>
            </tr>
           
              <tr>
              <td align="right">密码:</td>
              <td><input name="number" type="text" /></td>
            </tr>
           
           
           <tr>
              <td colspan="2" align="center"><input type="submit" name="submit" value="注册" /></td>
            </tr>
          </table>
          <p align="center">&nbsp;</p>
		
        </form>
 
  
  </div>
  
  </div>